<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改用户</title>
    <link href="/semantic-ui/semantic.css" rel="stylesheet" type="text/css">
    <script src="/semantic-ui/jquery-3.5.1.js"></script>
    <script src="/semantic-ui/semantic.js"></script>
</head>
<body>
<div class="ui container">
    <form class="ui form" th:action="@{/userUpData}" method="POST" th:object="${user}">
        <input type="hidden" th:value="*{userid}" name="userID">
        <div class="field">
            <label>用户名</label>
            <input type="text" name="username" placeholder="请输入用户名" required th:value="*{username}">
        </div>
        <div class="field">
            <label>密码</label>
            <input type="text" name="userpassword" placeholder="请输入密码" required th:value="*{userpassword}">
        </div>
        <div class="field">
            <label>账号类型</label>
            <input type="text" name="usertype" placeholder="请输入用户身份" required th:value="*{usertype}">
        </div>
        <button class="ui button" type="submit">提交</button>
    </form>

    <div class="ui success  message" th:unless="${#strings.isEmpty(message)}">
        <i class="close icon"></i>
        <div class="header">提示：</div>
        <p th:text="${message}"></p>
    </div>
</div>
<script>
    $(".message .close").on('click',function () {
        $(this).closest(".message")
            .transition("fade");
    })
</script>
</body>
</html>